#ifndef __FAC_METHOD_H_
#define __FAC_METHOD_H_
#include "plants.h"
class CVegetableIFactory
{
public:
	virtual CVegetable * createVegetable() = 0;
};

class CCabbageFactory :public CVegetableIFactory
{
public:
	CVegetable * createVegetable()
	{
		return new CCabbage();
	}

};

class CCCarrotFactory :public CVegetableIFactory
{
public:
	CVegetable * createVegetable()
	{
		return new CCarrot();
	}
};
#endif